package org.dream.ui.chart.impl;

import org.dream.ui.chart.AxisModel;
import org.dream.ui.chart.ChartModel;

/**
 * 
 * @author qiuriyuchen E-mail:panpan_001@126.com
 */
public abstract class AxisModelImpl implements AxisModel {
	private boolean drawGrid;
	protected int tickWidth;
	protected ChartModel chartModel;

	public AxisModelImpl() {
		tickWidth = 7;
	}

	public boolean isDrawGrid() {
		return drawGrid;
	}

	public void setDrawGrid(boolean drawGrid) {
		this.drawGrid = drawGrid;
	}

	public int getTickLineLength() {
		return tickWidth;
	}

	public void setTickLineLength(int tickLength) {
		this.tickWidth = tickLength;
	}

	public void setChartModel(ChartModel chartModel) {
		this.chartModel = chartModel;
	}

	public ChartModel getChartModel() {
		return chartModel;
	}

	public int getPixelYTop() {

		return chartModel.getPixelYTop();
	}

	public int getPixelXLeft() {
		return chartModel.getPixelXLeft();
	}

	public int getPixelYButtom() {
		return chartModel.getPixelYButtom();
	}

	public int getPixelXRight() {
		return chartModel.getPixelXRight();
	}

}
